package com.adinnet.admin.system.mapper;

import com.adinnet.admin.system.model.vo.SysUserRoleVo;
import com.adinnet.admin.system.model.SysUserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户角色关联表 Mapper 接口
 * </p>
 *
 * @author sunjianbo
 * @since 2019-05-17
 */
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {

    List<SysUserRoleVo> selectByUserIds(@Param("userIds") List<Integer> userIds,@Param("roleId") Integer roleId);

    int insertBatch(@Param("userId") Integer userId, @Param("roleIds") List<Integer> roleIds);

    SysUserRoleVo selectRolesByUserId(@Param("userId") Integer userId);

    public List<SysUserRoleVo> getRoles(@Param("userId")Integer userId);
}
